﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Presentation/master.Master" AutoEventWireup="true" CodeBehind="CheckPOHistory.aspx.cs" Inherits="Stationery_Inventory.Presentation.PurchaseOrder.CheckPOHistory"  %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

    <div class = "row">
    
        <h3 class="text-center">
                <strong>LOGIC University<br />
                Check Purchase Order History 
                &amp; Purchase Item Details</strong></h3>
      
    </div>

    <asp:RequiredFieldValidator ID="valreqDateFrom" runat="server" 
        ErrorMessage="Date From is required" ControlToValidate="tbDateFrom" 
        ForeColor="#FF6600"></asp:RequiredFieldValidator>
    <br />
    <asp:RequiredFieldValidator ID="valreqDateTo" runat="server" 
        ErrorMessage="Date To is required" ControlToValidate="tbDateTo" 
        ForeColor="#FF6600"></asp:RequiredFieldValidator>

    <div class = "row">
    
        <strong>
        <asp:Label ID="lblCheckPurchaseOrders" runat="server" CssClass="col-md-7 text-info" Font-Bold="True" 
            Font-Size="Large" Text="Check Purchase Orders"></asp:Label>
        </strong>
        </div>
        <br />

   <div class = "row">
        <asp:Label ID="lblDateFrom" runat="server" CssClass="col-md-4 text-info" Text="Date From"></asp:Label>
<asp:TextBox ID="tbDateFrom" runat="server" CssClass="col-md-4 text-info">From When</asp:TextBox>
    </div>

    <div class ="row">
        <asp:Label ID="lblDateTo" runat="server" CssClass="col-md-4 text-info" Text="DateTo"></asp:Label>
<asp:TextBox ID="tbDateTo" runat="server" CssClass="col-md-4 text-info">Till When</asp:TextBox>
    </div>

        <br />
        <div class = "row">
    <asp:Button ID="btnCheckPOList" runat="server" onclick="btnCheckPOList_Click" 
        Text="Check Purchase Orders" CssClass="btn btn-default" />
        </div>

        <br />
    <br />

    <div class = "row" style="overflow:auto">
    <asp:GridView ID="gvPurchaseOrdersList"  runat="server" CssClass="col-sm-12 table table-striped table-bordered table-hover" >
    </asp:GridView>
    </div>

        <asp:RegularExpressionValidator ID="valregDateFrom" runat="server" CssClass="col-sm-12 text-info"
            ControlToValidate="tbDateFrom" 
            ErrorMessage="Enter a DD/MM/YYYY for Date From:" ForeColor="Red" 
            
        
        ValidationExpression="(0[1-9]|[12][0-9]|3[01])[- /.](0[1-9]|1[012])[- /.](19|20)\d\d" 
        SetFocusOnError="True"></asp:RegularExpressionValidator>
        <br />

         <asp:RegularExpressionValidator ID="valregDateTo" runat="server" CssClass="col-sm-12 text-info"
            ControlToValidate="tbDateTo" 
            ErrorMessage="Enter a DD/MM/YYYY for Date To:" ForeColor="Red" 
            
        
        
        ValidationExpression="(0[1-9]|[12][0-9]|3[01])[- /.](0[1-9]|1[012])[- /.](19|20)\d\d" 
        SetFocusOnError="True"></asp:RegularExpressionValidator>

   <br />
    <div class = "row">
    <asp:Label ID="lblCheckItemsinPO" runat="server" CssClass="col-md-7 text-info" Font-Bold="True" 
         Text="Check Items in a Purchase Order" Font-Size="Large"></asp:Label>
        </div>
    
    <asp:RegularExpressionValidator ID="valregPurchaseID" runat="server" 
        ControlToValidate="tbPurchaseID" 
        ErrorMessage="Enter only positive integers for Purchase ID" ForeColor="#FF6600" 
        ValidationExpression="[0-9]+"></asp:RegularExpressionValidator>
    <br />
    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
        ControlToValidate="tbPurchaseID" ErrorMessage="Purchase ID is required" 
        ForeColor="#FF6600"></asp:RequiredFieldValidator>
    
    <br />
    <div class ="row">
    <asp:Label ID="lblPurchaseID" runat="server" CssClass="col-md-4 text-info" Text="Enter Purchase ID"></asp:Label>
&nbsp;<asp:TextBox ID="tbPurchaseID" width = "200px" runat="server" CssClass="col-md-5 text-info">1000</asp:TextBox>
</div>
    <br />
    <br />
    <div class = "row">
    <asp:Button ID="btnCheckPurchaseOrderItems"  CssClass="btn btn-primary" runat="server" 
        onclick="btnCheckPurchaseOrderItems_Click" Text="Check Purchase Order Items" />
        </div>
    <br />
    <br />

    <div class = "row">
    <asp:GridView ID="gvPurchaseOrderItems" CssClass="col-sm-12 table table-striped table-bordered table-hover" runat="server">
    </asp:GridView>
    </div>

        <br />
        <br />
      


    </asp:Content>

